package com.tuyan.aixiang.api;

import com.tuyan.aixiang.api.helper.ApiManager;
import com.tuyan.aixiang.api.module.Account;
import com.tuyan.aixiang.api.module.Device;
import com.tuyan.aixiang.api.module.Notice;
import com.tuyan.aixiang.api.module.User;
import com.tuyan.aixiang.api.module.Version;
import com.tuyan.aixiang.api.module.YsApi;
import com.tuyan.aixiang.common.Constant;

public class HttpClient {

    /**
     * 账号相关
     */
    public static Account getAccount() {
        return ApiManager.getInstance().getRetrofit(Constant.AIXIANG_API_HOST, Constant.SERVICE_PATH).create(Account.class);
    }
    /**
     * 设备相关
     */
    public static Device getDevice() {
        return ApiManager.getInstance().getRetrofit(Constant.AIXIANG_API_HOST, Constant.SERVICE_PATH).create(Device.class);
    }
    /**
     * 用户相关
     */
    public static User getUser() {
        return ApiManager.getInstance().getRetrofit(Constant.AIXIANG_API_HOST, Constant.SERVICE_PATH).create(User.class);
    }

    /**
     * 消息相关
     */
    public static Notice getNotice() {
        return ApiManager.getInstance().getRetrofit(Constant.AIXIANG_API_HOST, Constant.SERVICE_PATH).create(Notice.class);
    }

    /**
     * 版本
     */
    public static Version getVersion() {
        return ApiManager.getInstance().getRetrofit(Constant.AIXIANG_API_HOST, Constant.SERVICE_PATH).create(Version.class);
    }

    /**
     * 萤石api
     * @return
     */
    public static YsApi getYsApi() {
        return ApiManager.getInstance().getRetrofit(Constant.YS_API_HOST, Constant.SERVICE_PATH).create(YsApi.class);
    }
}
